package lab02.test33; /**
 * Created by ASUS on 2017/11/15.
 */
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Test{
    public static void main(String[] args) {
        List<String> l = new ArrayList<String>();
        Scanner ch = new Scanner(System.in);
        System.out.println("请输入若干个单词：");
        String a = ch.nextLine();
        String [] arr = a.split(" ");
        String term;
        for (int i = 0 ; i < arr.length ;i ++){
            for (int j =  + 1 ; j < arr.length ; j ++){

                if (arr[i].compareToIgnoreCase(arr[j])>0){
                    term=arr[i];
                    arr[i]=arr[j];
                    arr[j]=term;
                }
            }
        }
        for (String x :arr){
            System.out.println(x);
        }
    }
}